package com.AA.identity;

import java.util.Enumeration;
import java.util.Hashtable;

public class findKeyWord {
	@SuppressWarnings("rawtypes")
	Hashtable KeyWordsHash;
	public void init(Hashtable KeyWordsHash){
		//isKeyWord kw =new isKeyWord(); 
		this.KeyWordsHash = KeyWordsHash;
	 }
	 public int findKey(String classWord) {
		    int KEY;
		    for (Enumeration e = this.KeyWordsHash.keys(); e.hasMoreElements(); ) {
		      KEY = Integer.parseInt( (String) e.nextElement());
		      if ( ( (String)this.KeyWordsHash.get(Integer.toString(KEY))).
		          equalsIgnoreCase(classWord)) {
		        return KEY;
		      }
		    }
		    return -1;
		  }
}
